import React from 'react'
import PropTypes from 'prop-types'
import { View, Text, StyleSheet } from 'react-native'
import { ScaleS, ScaleT, ONE_PIXEL } from 'src/utils/ScreenUtil'
import CustomImage from 'src/components/image/CustomImage'

export default function PrivilegeCell (props) {
  return (
    <View style={[styles.container, props.style]}>
      <CustomImage style={styles.img} source={props.imgUri}/>
      <Text style={styles.title}>{props.title}</Text>
      {/* <Text style={styles.value1}>{props.value1}</Text>
      <View style={styles.line}/> */}
      <Text style={styles.value2}>{props.value}</Text>
    </View>
  )
}
PrivilegeCell.propTypes = {
  style: PropTypes.object,
  imgUri: PropTypes.number,
  title: PropTypes.string,
  value: PropTypes.string
}
const styles = StyleSheet.create({
  container: {
    marginTop: ScaleS(15),
    width: ScaleS(335),
    height: ScaleS(45),
    backgroundColor: '#FAFAFA',
    borderRadius: ScaleS(10),
    flexDirection: 'row',
    alignItems: 'center'
  },
  img: {
    height: '100%'
  },
  title: {
    flex: 1,
    marginLeft: ScaleS(17),
    fontSize: ScaleT(15),
    fontWeight: '500',
    color: '#444444'
  },

  line: {
    width: ONE_PIXEL,
    height: ScaleS(14),
    marginHorizontal: ScaleS(5),
    backgroundColor: 'rgba(151, 151, 151, 0.72)'
  },
  value2: {
    fontSize: ScaleT(13),
    fontWeight: '500',
    color: '#63D3A5',
    marginRight: ScaleS(10)
  },
  value1: {
    fontSize: ScaleT(13),
    fontWeight: '400',
    color: '#999999'

  }
})
